using System.Collections.Generic;

namespace game_stuff
{
    public class SightAddStatus
    {
        public HashSet<CharacterStatus> NowInSightCharacterStatusSet { get; set; }
        public float OnlyOneInSightDamage { get; private set; }
        public float EveryInSightDec { get; set; }
        public float InSightEnemyDec { get; set; }

        public void Refresh(float[] vector)
        {
            OnlyOneInSightDamage = vector[0];
            EveryInSightDec = vector[1];
            InSightEnemyDec = vector[2];
        }

        public SightAddStatus()
        {
            NowInSightCharacterStatusSet = new HashSet<CharacterStatus>();
            OnlyOneInSightDamage = 0;
            EveryInSightDec = 0;
            InSightEnemyDec = 0;
        }

        public float GetDec(CharacterStatus genDamageWhoMake)
        {
            return NowInSightCharacterStatusSet.Count * EveryInSightDec +
                   (NowInSightCharacterStatusSet.Contains(genDamageWhoMake)
                       ? InSightEnemyDec
                       : 0f);
        }
    }
}